Method and arrangement for echo cancellation of voice signals

ABSTRACT

A method and arrangement for cancelling echoes in a communication terminal ( 400 ) during a voice call with an opposite party. The communication terminal ( 400 ) comprises an echo cancelling unit ( 416,600 ) adapted to produce an estimate of echo information in received speech signals coming from a microphone in the communication terminal ( 400 ), and subtract the estimate from the received microphone signals, before being transmitted to the opposite party. The estimate is produced based on down-sampled received microphone signals and down-sampled received speech signals from the opposite party. The down-sampled speech signals from the opposite party are filtered in a digital filter ( 606 ), and the output signals from the filter ( 606 ) are up-sampled to form the estimate. Performing echo cancelling based on down-sampled speech signals from the opposite party and down-sampled microphone signals, requires a reduced amount of processing capacity of the communication terminal, still resulting in a sufficiently high quality echo cancellation.

TECHNICAL FIELD

The present invention relates generally to echo cancellation indigitally transferred voice communication, where two or more terminalsare communicating. In particular, the present invention can be usedwhere two parts are communicating speech via mobile phones.

BACKGROUND

In a digital voice communication system, speech is transferred betweenterminals of a speaking party and a listening party over a communicationlink. In this description, mobile terminals are communicating with eachother in a mobile communicating system. However, the terminals can beany type of terminals for digitally transferred speech communicationwith a microphone and a loudspeaker. Furthermore, the voicecommunication system can be any type of system where two or more partiesare communicating their speech, by transferring digitally encoded voicesignals, e.g. a wireless or non-wireless telephony system, a conferencetelephony system, an entry phone system in a building, walkie-talkies,etc.

With reference to FIG. 1 a, two persons 100 and 108 speaking with eachother, use terminals 102 and 106, respectively, transmitting speechsignals digitally across a communication link 104. Each terminal has amicrophone and a loudspeaker. When person 100 is speaking in themicrophone of terminal 102, his or her speech is transferred across thecommunication link 104, and is emitted from the loudspeaker of terminal106. The speech emitted from the loudspeaker is picked up by themicrophone of terminal 106, together with the speech of person 108,resulting in a combined signal to the opposite terminal 102. Thiscombined signal is transferred across the communication link 104 toterminal 102, where person 100 hears it in his or her loudspeaker.

In this process, the speech picked up by the microphone of terminal 102is converted into digital signals at terminal 102, and is then convertedback to analogue signals at terminal 106, before being emitted as speechby the loudspeaker of terminal 106. Correspondingly, the speech pickedup by the microphone of terminal 106 is converted into digital signalsat terminal 106, which are converted back to analogue signals atterminal 102, before being emitted as speech by the loudspeaker ofterminal 102.

During the transfer from the microphone of terminal 102 to theloudspeaker of terminal 106, the speech is delayed, due to digitalprocessing of the signals in both terminals 102 and 106, and in anyintermediate routers, gateways, etc. present at the communication link104, as well as due to propagation path delay. Such processes are e.g.analogue-to-digital or digital-to-analogue conversion (A/D and D/A,respectively), speech coding, speech buffering, or any other digitalprocesses associated with speech communication. The reproduced voicesignals from the loudspeaker of terminal 102 are delayed because of theabove described conversion, processing, and propagation. FIG. 1 b showshow the total delay D_(Total) of speech entering the microphone ofterminal 102 until emitted by the loudspeaker of terminal 102 basicallyincludes the following six parts also indicated in FIG. 1 a: D₁, arisingfrom the A/D conversion and signal processing at terminal 102; D₂,arising from the signal processing and propagation path delay on thecommunication link 104; D₃, arising from the D/A conversion and signalprocessing at terminal 106; D₄, arising from the speech propagation fromthe loudspeaker of terminal 106 to the microphone of terminal 106; D₅,arising from the A/D conversion and signal processing at terminal 106;D₆, arising from the signal processing and the propagation path delay onthe communication link 104; and D₇, arising from the D/A conversion andsignal processing at terminal 102. As a result, person 100, usingterminal 102, hears his or her own speech as a delayed echo, which isnaturally perceived as disturbing. Typically, the delay D_(Total) of theperceived echo is in the range of 30-500 ms.

For reducing echoes in a digital voice communication system two methodsare generally applied today, referred to as echo suppression and linearfiltering based echo cancellation.

Echo Suppressors

An echo suppressor is typically used in mobile terminals such asterminals 102 and 106, temporarily blocking the frequencies of theoutput signals to the communication link 104 when echoes are detected tobe present. A common echo suppressor is the Non-Linear Processor, NLP.To determine when echoes are present and for which frequencies, the NLPin terminal 106 receives information about the frequencies of theincoming signals on the communication link 104. It also receivesinformation about the frequencies of the microphone signals of terminal106. A terminal (e.g. 102 and 106) determines whether it currently thespeech sending or the speech receiving party. If a terminal 106determines that it is the speech receiving party, it temporarily blocksfrequencies, being the same in the microphone signals of the terminal106 and in the incoming signals on the communication link 104, frombeing transmitted on the communication link 104 to the opposite terminal102. Similarly, if a terminal 102 determines that it is the receiver ittemporarily blocks frequencies, being the same in the microphone signalsof terminal 102 and the incoming signals on the communication link 104,from being transmitted on the communication link 104 to the oppositeterminal 106.

Alternatively, the NLP in the terminals can be designed to detect whenecho is dominating the speech of the user of the terminal, and blockthese frequencies.

An advantage of the echo suppressor is that almost no echo remains forthe blocked frequencies. However, there are some drawbacks: Frequenciesin the background sound are temporarily blocked, resulting in loss ofnaturalness. In double-talk, when two persons are speakingsimultaneously, frequencies in the speech of one party are temporarilyblocked, which also affects the emitted speech of the other party.

Linear Filtering Based Echo Cancellers

Typically, a linear filtering based echo canceller is also used inmobile terminals such as terminals 102 and 106. Thus, the linearfiltering based echo canceller in terminal 106 estimates the part of themicrophone signal of terminal 106, arising from the speech of person100, which is emitted by the loudspeaker of terminal 106, and subtractsit from the signals to be transmitted back to terminal 102. To estimatethe echo of the speech, a digital filter is used. An advantage of linearfiltering based echo cancellers is that they preserve the naturalness ofspeech, because they do not block frequencies from the background soundor the other speaking party. However, linear filtering based echocancellers also have some drawbacks: They may leave a noticeableremaining echo due to that the digital filter does not completely modelthe echo, and require a great amount of processing capacity to achieve asufficient echo reduction.

For providing an estimate of the required processing capacity, thefollowing example is given:

The calculation rate C is the product of a sampling frequency f and afilter length l, i.e. C=f×l, where the filter length l is the product ofthe sampling frequency f and echo delay t, l=f×t. In other words C=f²×t.For an echo t of 100 ms and a sampling frequency f of 8 kHz, thecalculation rate C is 8000² Hz×0.1 s=6.4 million operations per second(MOPS). For 16 kHz, 25.6 MOPS will be necessary. For 32 kHz, 102.4 MOPS,and for 48 kHz, 230.4 MOPS are required.

Combinations

Echo suppressors and linear filtering based echo cancellers are thusboth associated with some drawbacks, therefore combinations using bothtechniques are mostly used, designed to combine the advantages and avoidthe drawbacks. Hereinafter, the term “echo canceller” refers to anycombination of linear filtering based echo cancellers with or withoutecho suppressors.

With reference to FIG. 2, an example of a typical design of an echocanceller will now be briefly described. The echo canceller is placed ina terminal 200 used by a person 210 during a voice call with an oppositeterminal (not shown). The incoming signals on the communication link 202are converted to analogue voice signals by the D/A-converter 204, whichare emitted by the loudspeaker 206 of terminal 200. The microphone 212of terminal 200 thus receives both the speech of person 210 and thespeech from the opposite terminal, emitted from the loudspeaker 206 andaffected by the environment 208 of terminal 200. An A/D converter 214takes as input the signals from the microphone 212, and outputs digitalsignals, representing the microphone signals, to a subtracter 218.

The echo canceller also includes an adaptive digital filter 216, whichreceives the incoming signals from the communication link 202 from theopposite terminal, and the filter 216 also receives the output signalsfrom the subtracter 218, and produces output signals. The output signalsfrom the echo canceller are fed as input signals to the subtracter 218.The output signals from the filter 216 are then subtracted from theA/D-converted signal at the subtracter 218. Thus, the output signalsfrom the subtracter 218 represent the difference between theA/D-converted microphone signals and the output signals from the filter216. The filter coefficients of filter 216 are determined dynamically(adapted) based on the A/D-converted microphone signals of terminal 200,i.e. the filter coefficients are updated continuously. The continuousupdate is needed because the environment 208 of terminal 200 changes.The filter 216 processes the signals received on the communication link202. Thus, the output signals from the filter 216 represent an estimateof the part of the output signals from the A/D-converter 214 whichoriginates from the loudspeaker 206 of terminal 200. These estimatedsignals will be subtracted, by the subtracter 218, from the outputsignals from the A/D-converter 214 to achieve an adequate echocancellation. The output signals from the subtracter 218 are finallyprocessed by a Non-Linear Processor (NLP) 220 to suppress any remainingechoes, before being transferred to the opposite terminal (not shown).

With reference to FIG. 3, another known design of an echo canceller willbe described. This echo canceller is placed in a terminal 300 operatedby a person 310. Basically, the signals on the incoming communicationlink 302 are divided into a plurality of frequency bands which areprocessed individually before being combined together into a compositesignal.

Both the signals on the communication link 302 and the signals from themicrophone 312 are divided into a plurality of frequency bands 1,2, . .. , N by a number of filters 304 a,b, . . . , n and 314 a,b, . . . , n,respectively. Before the signals on the communication link 302 areemitted by the loudspeaker, they are converted by a D/A-converter (notshown) to analogue speech signals, and after the emitted sounds havebeen received by the microphone 312 they are converted by anA/D-converter (not shown). The speech emitted by the loudspeaker 306 isheard by person 310, and is also being picked up, affected by theenvironment 308 of terminal 300, by the microphone 312.

For each band filtered by the respective filter pairs 304 a/314 a, 304b/314 b, . . . , 304 n/314 n an echo control unit 316 performs echocancellation, as described above, on the respective band. Each frequencyband is then filtered by a respective filter 318 a,b, . . . , n, andecho suppressed by the NLP 320 in the manner described above. Finally,the filtered and echo suppressed frequency bands are combined into acomposite signal in the NLP 320, before being transferred to theopposite terminal (not shown).

An advantage of the described echo canceller is that the requiredprocessing capacity will be decreased, because the sampling rate can bereduced when the signals to be echo cancelled is divided into separatefrequency bands. As the sample rate is reduced, the required processingcapacity decreases with the square of the sample rate reduction. Thefollowing example will show how the calculation rate C for the abovedescribed echo canceller is decreased:

As described above, the formula for the calculation rate is defined asC=f²×l. For a sampling frequency f=20 kHz and an echo delay l=100 ms,the calculation rate C is 20000² Hz×0.1 s=40 MOPS. If the signals areinstead divided into 4 separate frequency bands, each having thesampling frequency 5 kHz, the calculation rate for each frequency band Cis 5000² Hz×0.1 s=2.5 MOPS. For the 4 frequency bands in total thecalculation rate C_(tot) is then 4×2.5 MOPS=10.0 MOPS. Thus, dividingthe signals to be echo cancelled into 4 bands decreases the calculationrate from 40 MOPS to 10 MOPS, i.e. the total calculation rate isdecreased by a factor 4.

Another advantage of the echo canceller is that different linearfiltering based echo cancellers can be used for the respective bands.If, e.g., most of the echo is present in the lower frequency range, andless in the higher frequency range, then a complex echo canceller,resulting in a small remaining echo, can be used for the lower frequencyrange, and a less complex one can be used for the higher frequencyrange. However, a drawback of the described echo canceller is that theprocess of combining the bands into an acceptable composite signal isrelatively complex.

Hence, there are certain problems associated with the existing solutionsoutlined above. Even with a combination of echo suppressors and linearfiltering based echo cancellers it is a problem, considering the limitedprocessing capacity of the terminal, to design an apparatus producing aremaining echo from the linear filtering based echo cancellers that issmall enough to be suppressed by the echo suppressors, without losingthe naturalness of the resulting speech signals.

Another problem is that in situations with a band-divided echocanceller, the design of the summary function for the bands is verycomplex. This is due e.g. to the fact that the filter characteristicsfor the bands are not ideal in practice, and that plural different echocontrol units are used for the respective bands.

SUMMARY

It is an object of the present invention to address at least some of theproblems outlined above. Furthermore, it is an object of the presentinvention to provide a solution for enabling an effective cancelling ofechoes in a communication terminal, requiring a reduced amount ofprocessing capacity, during voice communication over a communicationlink.

These objects and others may be obtained by a method and an apparatusaccording to the attached independent claims.

According to one aspect, a method is provided for cancelling echoes in acommunication terminal during a voice call with an opposite party. Thecommunication terminal comprises a loudspeaker, a microphone, and anecho cancelling unit. When cancelling echoes, the echo cancelling unitreceives speech signals from the opposite party and speech signals fromthe microphone. The microphone signals are fed into a first and a secondbranch, where in the first branch a first estimate of the echoinformation in the microphone signals is produced, based on the receivedspeech signals from the opposite party and the received microphonesignals. Finally, the estimate is subtracted from the signals fed intothe second branch, resulting in an echo cancelled speech signal to betransmitted to the opposite party. When producing the first estimate,the received microphone signals in the first branch are down-sampledwith a down-sampling factor i, and the received speech signals from theopposite party are down-sampled with the same down-sampling factor i.The down-sampled speech signals from the opposite party are filtered bya digital filter, resulting in a second estimate. The second estimate isthen up-sampled with an up-sampling factor i, being equal to thedown-sampling factor i, forming the first estimate.

According to another aspect, an arrangement in a communication terminalis provided for cancelling echoes during a voice call with an oppositeparty. The communication terminal comprises a loudspeaker, a microphone,and an echo cancelling unit. The echo cancelling unit is adapted toreceive speech signals from the opposite party and speech signals fromthe microphone. The echo cancelling unit comprises a first and a secondbranch, where the first branch is adapted to receive the microphonesignals and produce an estimate of the echo information in themicrophone signals, based on the received speech signals from theopposite party and the received microphone signals. The second branch isadapted to receive the microphone signals, and a subtracter is adaptedto subtract the produced estimate from the signals in the second branch.The echo cancelling unit further comprises a first down-sampler adaptedto down-sample the received microphone signals in the first branch witha down-sampling factor i, and a second down-sampler adapted todown-sample the received speech signals from the opposite party with thesame down-sampling factor i. Furthermore, the echo cancelling unitcomprises a digital filter which is adapted to filter the down-sampledspeech signals from the opposite party to produce a second estimate, andan up-sampler adapted to up-sample the second estimate with a factor i,being equal to the down-sampling factor i, resulting in the firstestimate. Performing echo cancelling based on down-sampled speechsignals from the opposite party and down-sampled microphone signals, mayrequire a relatively small amount of processing capacity of thecommunication terminal, still resulting in a sufficiently high qualityecho cancellation.

According to a further aspect, a method is provided for cancellingechoes in a communication terminal during a voice call with an oppositeparty. The communication terminal comprises a loudspeaker, a microphone,and an echo cancelling unit. When cancelling echoes, the echo cancellingunit receives information about the currently available processingcapacity of the communication terminal, selects a suitable echocancelling procedure based on the currently available processingcapacity, and applies the selected echo cancelling procedure. The echocancelling procedure is selected from a plurality of selectable echocancelling procedures in the echo cancelling unit. Furthermore, the echocancelling procedure comprises the steps of, down-sampling incomingspeech signals on a communication link, filtering the down-sampledsignals in an adaptive filter, up-sampling the filtered signals, andsubtracting the up-sampled signals from speech signals coming from themicrophone.

According to a still further aspect, an arrangement in a communicationterminal is provided for cancelling echoes during a voice call with anopposite party. The communication terminal comprises a capacityindicator adapted to indicate the currently available processingcapacity of the communication terminal, a control unit adapted to selectone available echo cancelling procedure, based on the currentlyavailable processing capacity, and an echo cancelling unit adapted toapply the selected echo cancelling procedure. Furthermore, the echocancelling procedure comprises the steps of, down-sampling incomingspeech signals on a communication link, filtering the down-sampledsignals in an adaptive filter, up-sampling the filtered signals, andsubtracting the up-sampled signals from speech signals coming from themicrophone. Varying the echo cancelling procedure due to the currentlyavailable processing capacity of the communication terminal may resultin a flexible and efficient using of the processing capacity of thecommunication terminal.

Different embodiments of the methods and arrangements in thecommunication terminal above are possible. For example, the echocancelling unit may select the down-sampling and up-sampling factor ifrom a plurality of values, where each of the values represents aseparate available echo cancelling procedure. The echo cancellingprocedure may be selected based on the available processing capacity ofthe communication terminal. The signals in the second branch may bedelayed by a time t, being equal to the time delay being introduced inthe production of the estimate, before the first estimate is subtractedfrom the signals. The digital filter may be adaptive, and thedown-sampled microphone signals may be used for adapting the filter. Anecho suppressor may be adapted for suppressing any remaining echoes fromthe echo cancelling unit.

Further features and benefits of the present invention will becomeapparent from the detailed description.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will now be described in more detail by means ofexemplary embodiments and with reference to the accompanying drawings,in which:

FIG. 1 a is a basic overview illustrating a scenario where two personsare speaking in terminals over a digital communication link.

FIG. 1 b is a diagram illustrating different time delay parts of an echotypically occurring in digital communication.

FIG. 2 is a block diagram illustrating a combination of an echocanceller and an echo suppressor, according to the prior art.

FIG. 3 is a block diagram illustrating another combination of aband-divided echo canceller and an echo suppressor, according to theprior art.

FIG. 4 is a block diagram illustrating a combination of an echocanceller and an echo suppressor, in accordance with one embodiment.

FIG. 5 is a flow chart illustrating a method for controlling the echocanceller, in accordance with another embodiment.

FIG. 6 is a block diagram illustrating an echo cancellation unit, inaccordance with yet another embodiment.

DETAILED DESCRIPTION

Briefly described, the present invention provides a solution where avoice communication terminal, during speech communication with anopposite terminal, can achieve echo cancelling of the microphone signalsmore effectively and requiring less processing capacity, beforetransmitting the signals to the opposite terminal. An estimate of thepart of the microphone signals comprising the majority of the echoinformation is produced by down-sampling incoming speech signals on thecommunication link from the opposite terminal, filtering thedown-sampled signals in an adaptive filter, and up-sampling the outputsignals from the adaptive filter. Finally, the echo estimate issubtracted from the microphone signals.

The present invention also provides a solution where a voicecommunication terminal, during speech communication with an oppositeterminal, can detect its own currently available processing capacity,and depending on the detected processing capacity adjust its own echocancelling procedure to a suitable one. The terminal detects theavailable processing capacity, and based on that capacity, it determinesa suitable echo cancelling procedure. Then, the terminal checks whetherthe currently used procedure is the same as the determined one. If theprocedures are not the same, the terminal replaces the procedure withthe determined one, and continues to receive information about thecurrently available processing capacity. On the other hand, if theprocedures are the same it is not necessary to replace the procedure andthe terminal continues to receive information about the currentlyavailable processing capacity.

Alternatively, it is also possible to use the echo cancelling methoddescribed above, regardless of the available processing capacity of theterminal, i.e. without adjusting the echo cancelling procedure based onthe currently used processing capacity.

Throughout this description, the term “speech” refers to any form ofvoice sounds. An “echo canceller” can be any combination of linearfiltering based echo cancellers with or without echo suppressors. Theterm “echo information in the microphone signals” is the part of thereceived microphone signals originating from the loudspeaker. In thefollowing examples, it is assumed that FIR-NLMS (Finite ImpulseResponse-Normalised Least Mean Square) is used as the filtering methodfor the estimation. However, the filter can also use any other suitableadaptive or non-adaptive method, e.g. NLMS (Normalised Least MeanSquare), RLS (Recursive Least Square), LS (Least Square), etc.

With reference to FIG. 4, an embodiment of an arrangement for echocancelling will now be described. A terminal 400 is used by a person410, during a voice call with an opposite terminal (not shown). Theincoming digital speech signals arriving on a communication link 402 areconverted by a D/A-converter 404 into analogue voice signals, which areemitted by a loudspeaker 406 of terminal 400. A microphone 412 ofterminal 400 receives both the speech of person 410 and the speech fromthe opposite terminal, emitted from the loudspeaker 406 and affected bythe environment 408 of terminal 400. The microphone signals from themicrophone 412 are converted by an A/D-converter 414 into digitalsignals. The terminal also includes an echo cancelling unit 416, whichtakes as input the signals from the communication link 402 from theopposite terminal and also the A/D-converted signals from the microphone412 of terminal 400, and produces an output signal. The processed outputsignal is finally further processed by a Non-Linear Processor (NLP) 422,to e.g. suppress any remaining echoes, before being transferred to theopposite terminal (not shown). The echo cancelling unit 416 can applyone of a plurality of selectable echo cancelling procedures, 416 a, 416b, . . . , which is selected depending on the currently availableprocessing capacity of the terminal 400. The echo cancelling procedures416 a, 416 b, . . . require different amounts of available processingcapacity.

For example, if a large currently available processing capacity isdetected, a more rigorous echo cancelling procedure, requiring moreprocessing capacity, will be used. When, on the other hand, lesscurrently available processing capacity is detected, a less rigorousecho cancelling procedure, requiring less processing capacity, will beused.

A capacity indicator 418 indicates the currently available processingcapacity of the terminal 400, and provides this value as input to acontrol unit 420. The available processing capacity varies, due todifferent ongoing processes in the terminal. The capacity indicator 418monitors one or more processors (not shown) of the terminal 410 toreceive information of the currently available processing capacity.

The control unit 420 then accordingly selects a suitable echo cancellingprocedure 416 a, 416 b, . . . , and also provides information about theselected echo cancelling procedure 416 a, 416 b, . . . to the NLP 422,which adjusts its algorithms depending on the selected echo cancellingprocedure 416 a, 416 b, . . . . An advantage of the present invention isthat the echo cancelling procedure can be adjusted due to the currentlyavailable processing capacity. In other words, when just a small amountof processing capacity is used for other processing in the terminal 400,more processing capacity of the terminal 400 can be used for echocancelling, resulting in a better echo cancellation. When on the otherhand more processing capacity of the terminal 400 is required for otherprocessing, a less capacity requiring procedure, still resulting insufficient echo cancelling, can be used. In this way, the speech qualitycan be optimised without compromising the processing requirements ofother activities in the terminal 400. An example of such a procedure,requiring less processing capacity but nevertheless resulting insufficient echo cancellation, is described below in accordance with FIG.6. In practice, an NLP is used for suppressing any remaining echoes inthe output signals from the echo cancelling unit 416. However, othercircuits can be also be used for removing potential remaining echoes.For an echo cancelling unit producing only minor remaining echoes, theNLP may be excluded. Therefore, the NLP is optional and not necessaryfor the present invention.

With reference to FIG. 5, illustrating a flow chart with steps executedin a communication terminal operated by a user, a process of selectingan echo cancelling method in accordance with another embodiment will nowbe described. The terminal is capable of using different echo cancellingprocedures depending on the currently available capacity. In a firststep 500, an indication of the available processing capacity is more orless continuously received from a capacity indicator or the like. In anext step 502, a suitable echo cancelling procedure is selected,depending on the available processing capacity. In a next step 504,depending on whether the presently applied echo cancelling procedure andthe echo cancelling procedure selected in step 502 are the same or not,it is decided whether the procedure should be updated or not. If theselected echo cancelling procedure is currently applied, it is notnecessary to update the echo cancelling procedure, and the procedurereturns to step 500 to continue receiving the indication of theavailable processing capacity of the terminal. If instead the selectedecho cancelling procedure is not currently applied, it is decided instep 504 to update the echo cancelling procedure. Then, in step 506 thecurrently applied echo cancellation procedure is replaced by theselected echo cancelling procedure. In an optional next step 508, thealgorithm of the NLP may also be updated accordingly, if used. Finally,the procedure returns to step 500 and continues to receive theindication of the available processing capacity of the terminal.

With reference to FIG. 6, an embodiment of an echo cancelling unit willnow be described with further reference to FIG. 4. The echo cancellingunit 600 (also referred to as 416 in FIG. 4) is capable of applying aplurality of selectable echo cancelling procedures 416 a, 416 b, . . . .When applying a specific echo cancelling procedure, the echo cancellingunit 600 will work as follows: The echo cancelling unit takes as input602 the speech signals from the incoming communication link 402, and asinput 612 the output signals from the A/D-converter 414. The unit 600feeds the signals of its output 624 as input to the NLP 422. Theincoming signals of input 612 are fed into two branches, an estimatingbranch 608 and a speech branch 610.

The input signals of the inputs 602 and 612 are down-sampled with afactor i by the down-samplers 604 and 614, respectively. Thedown-sampling factor i can be an integer value (2, 3, 4, . . . , n),e.g. a down-sampling factor 2 from 24 kHz to 12 kHz, or a down-samplingfactor 3 from 24 kHz to 8 kHz. However, the down-sampling factor i canalso be any other suitable value, e.g. a decimal number. Each value forthe down-sampling factor i represents a separate echo cancellingprocedure.

The unit 600 has a digital filter 606 which takes as input the outputsignals from the down-sampler 604 and produces a down-sampled echoestimate. The digital filter is adapted based on the output from thesubtracter 616 for which the down-sampled output signals from thedown-sampler 614 are fed as input. The filter coefficients in filter 606are determined dynamically from the inputs and are updated continuously,due to the changing environment of the terminal 400. The filterprocesses the input signals from the down-sampler 604, resulting in anestimate of the part of the signals of the input 612 which originatesfrom the loudspeaker 406 of terminal 400 and are affected by theenvironment of the terminal 400, down-sampled with the down-samplingfactor. These down-sampled estimate signals will be fed as input signalsto the subtracter 616, and also to an up-sampler 618. The up-sampler 618up-samples the input signals with the same factor i as the down-samplingoperation was performed with. The output signals from the up-sampler 618are an estimate of the part of the microphone signals on the input 612,originating from the loudspeaker 406 of terminal 400. These microphonesignals are affected by the environment of the terminal 400.

The required processing capacity for the echo cancelling can beadjusted, due to the available processing capacity of the terminal 400,by varying the down-sampling factor i. Both the down-sampling andup-sampling operations are performed with this factor i. A higherdown-sampling factor i requires a relatively smaller amount ofprocessing capacity, and a lower sampling rate requires a relativelylarger amount of processing capacity.

However, the processing of the signals of the input 612 in theestimating branch 608 results in a delay, due to down-sampling andup-sampling and possible delay in the process of estimating the echo.Therefore, in the speech branch 610, a delay circuit 620 is adapted totake as input the signals of the input 612, and to produce the samedelay as for the estimating branch 608. The output signals from theup-sampler 618 are fed as a first input to a subtracter 622, and theoutput signals from the delay circuit 620 are fed as a second input tothe subtracter 622. The subtracter 622 subtracts the signals of itsfirst input from the signals of its second input, i.e. the outputsignals of the estimating branch 608 from the output signals of thespeech branch 610, resulting in echo reduced signals 624 on its output.Finally, these echo reduced signals are fed as input to the NLP 422.

The other selectable echo cancelling units can be any suitable echocancelling units and are not defined in detail in this description.

By means of the present invention, a flexible method for echo cancellingis obtained, optimising the speech quality without compromising theprocessing requirements of other activities in the terminal. Using theabove described solution, the echo cancelling can be performed for arelatively lower frequency range, where a majority of the echoes ispresent. Moreover, it is not necessary to combine the frequency rangesinto a composite signal, which is otherwise complicated and requireslarge amount of processing capacity.

While the invention has been described with reference to specificexemplary embodiments, the description is in general only intended toillustrate the inventive concept and should not be taken as limiting thescope of invention. Although mobile terminals or mobile phones have beenused throughout when describing the above embodiments, any otherterminals for voice communication over a digital communication link maybe used in the manner described. Although the method FIR-NLMS is used inthe embodiments herein, any other suitable adaptive or non-adaptivefiltering methods can also be used for estimating the echoes of themicrophone signals.

The invention is generally defined by the following independent claims.

The invention claimed is:
 1. A method for canceling echoes in acommunication terminal during a voice call with an opposite party, theterminal comprising a loudspeaker and a microphone, the methodcomprising the following steps being executed by an echo canceling unitin the terminal: a) receiving speech signals from the microphone on afirst input of the echo canceling unit, said speech signals from themicrophone referred to as microphone signals; b) feeding the receivedmicrophone signals into a first branch and a second branch; c) receivingspeech signals from the opposite party on a second input of the echocanceling unit; d) producing, in the first branch, a first estimate ofan echo information in the microphone signals, based on the receivedmicrophone signals and the received speech signals from the oppositeparty; e) performing a subtraction wherein the produced first estimateis subtracted from the signals fed into the second branch; and f)outputting the result from the subtraction from the echo canceling unit;and wherein the step of producing a first estimate further comprises thefollowing sub-steps: down-sampling the received microphone signals inthe first branch with a down-sampling factor i; down-sampling thereceived speech signals from the opposite party with the down-samplingfactor i; producing a down-sampled second estimate of the echoinformation in the microphone signals, by filtering the down-sampledspeech signals from the opposite party in a digital filter; andproducing the first estimate by up-sampling the second estimate with anup-sampling factor i, equal to the down-sampling factor i.
 2. A methodaccording to claim 1, wherein the down-sampling and up-sampling factor iis selected from a plurality of values, where each of the valuesrepresents a separate available echo canceling procedure.
 3. A methodaccording to claim 2, wherein the available echo canceling proceduresrequire different amounts of processing capacity of the terminal, andthe echo canceling procedure is selected based on the currentlyavailable processing capacity of the terminal.
 4. A method according toclaim 3, wherein the step of selecting echo canceling procedure furthercomprises replacing a currently used echo canceling procedure with theselected echo canceling procedure, if the currently used echo cancelingprocedure is not the same as the selected echo canceling procedure.
 5. Amethod according to claim 1, wherein the signals fed into the secondbranch are delayed by a time t before the subtraction in step e), thetime t being equal to the time delay introduced in the production of thefirst estimate.
 6. A method according to claim 1, wherein the digitalfilter is adaptive and the difference between the down-sampledmicrophone signals and the second estimate is used for adapting thefilter.
 7. A method according to claim 1, wherein any remaining echoesin the output signals from the echo canceling unit are suppressed by anecho suppressor.
 8. An arrangement in a communication terminal, forcanceling echoes during a voice call with an opposite party beforetransferring speech signals to the opposite party, comprising an echocanceling unit having: a) an first input adapted to receive speechsignals from a microphone of the terminal, said speech signals from themicrophone referred to as microphone signals; b) a second input adaptedto receive speech signals from an opposite party; c) a first branchadapted to receive the microphone signals on the first input, andproduce a first estimate of an echo information in the microphonesignals, based on the received microphone signals and the receivedspeech signals from the opposite party; d) a second branch adapted toreceive the microphone signals on the first input; and e) a subtracteradapted to perform a subtraction where the first estimate produced inthe first branch is subtracted from the signals of the second branch,before being outputted from the echo canceling unit; and wherein theecho canceling unit also comprises: a first down-sampler adapted todown-sample the received microphone signals in the first branch with adown-sampling factor i; a second down-sampler adapted to down-sample thereceived speech signals from the opposite party with the down-samplingfactor i; a digital filter adapted to produce a second estimate of theecho information in the microphone signals, by filtering thedown-sampled speech signals from the opposite party; and; an up-sampleradapted to produce the first estimate by up-sampling the second estimatewith an up-sampling factor i, equal to the down-sampling factor i.
 9. Anarrangement according to claim 8, wherein the down-sampling factor i isselectable from a plurality of values, where each value of i representsa separate available echo canceling procedure.
 10. An arrangementaccording to claim 9, comprising a capacity indicator adapted toindicate the currently available processing capacity of the terminal,and a control unit adapted to select one of the available echo cancelingprocedures, based on the indicated currently available processingcapacity, wherein the available echo canceling procedures requiredifferent amounts of processing capacity of the terminal.
 11. Anarrangement according to claim 10, wherein the control unit is alsoadapted to replace a currently used echo canceling procedure with theselected echo canceling procedure, if the currently used echo cancelingprocedure is not the same as the selected echo canceling procedure. 12.An arrangement according to claim 8, comprising a delay circuit in thesecond branch that is adapted to delay the received microphone signalsby a time t before said subtraction by the subtracter, the time t beingequal to the time delay introduced in the production of the firstestimate.
 13. An arrangement according to claim 8, wherein the digitalfilter is adaptive based on the difference between the down-sampledmicrophone signals and the second estimate.
 14. An arrangement accordingto claim 8, further comprising an echo suppressor adapted to suppressany remaining echoes in the output signals from the echo canceling unit.15. A method for canceling echoes in a communication terminal during avoice call with an opposite party, the terminal comprising a loudspeakerand a microphone, the method comprising the following steps beingexecuted by an echo canceling unit in the terminal: a) receivinginformation about the processing capacity currently available in theterminal; b) selecting a suitable echo canceling procedure based on thecurrently available processing capacity; and c) applying the selectedecho canceling procedure, wherein the echo canceling procedure isselected from a plurality of selectable echo canceling procedures in theecho canceling unit, which is adapted to use different echo cancelingprocedures; and wherein and the echo canceling procedure furthercomprises the following sub-steps: down-sampling incoming speech signalson a communication link; filtering the down-sampled signals in anadaptive filter; up-sampling the signals filtered by the adaptivefilter; and subtracting the up-sampled signals from speech signalscoming from the microphone.
 16. A method according to claim 15, whereinstep b) further comprises replacing a currently used echo cancelingprocedure with the selected echo canceling procedure if the currentlyused echo canceling procedure is not the same as the selected echocanceling procedure.
 17. A method according to claim 15, wherein theselected echo canceling procedure comprises the following steps: a)receiving speech signals from the microphone on a first input of theecho canceling unit, said speech signals from the microphone referred toas microphone signals; b) feeding the received microphone signals into afirst branch and a second branch; c) receiving speech signals from theopposite party on a second input of the echo canceling unit; d)producing, in the first branch, a first estimate of an echo informationin the microphone signals, based on the received microphone signals andthe received speech signals from the opposite party; e) performing asubtraction, where the produced first estimate is subtracted from themicrophone signals fed into the second branch; and f) outputting theresult from the subtraction from the echo canceling unit.
 18. A methodaccording to claim 17, wherein the signals fed into the second branchare delayed by a time t before the first subtraction, the time t havingthe same length as the time it takes to produce the first estimate. 19.A method according to claim 17, wherein the step of producing a firstestimate further comprises the following sub-steps: down-sampling thereceived microphone signals in the first branch by a factor i;down-sampling the received signals from the opposite party by the factori; producing a down-sampled second estimate of the echo information inthe microphone signals, by filtering the down-sampled speech signalsfrom the opposite party in a digital filter; and producing the firstestimate by up-sampling the second estimate.
 20. A method according toclaim 19, wherein the digital filter is adaptive and the differencebetween the down-sampled microphone signals and the second estimate isused for adapting the filter.
 21. An arrangement in a communicationterminal for canceling echoes during a voice call with an oppositeparty, comprising: a) a capacity indicator adapted to indicate thecurrently available processing capacity of the terminal; b) a controlunit adapted to select one available echo canceling procedure from aplurality of selectable echo canceling procedures, based on thecurrently available processing capacity; and c) an echo canceling unitadapted to apply the selected echo canceling procedure; and wherein theecho canceling unit is configured according to the selected echocanceling procedure to: down-sample incoming speech signals on acommunication link; filter the down-sampled signals in an adaptivefilter; up-sample the signals filtered by the adaptive filter; andsubtract the up-sampled signals from speech signals coming from themicrophone.
 22. An arrangement according to claim 21, wherein thecontrol unit is also adapted to replace a currently used echo cancelingprocedure with the selected echo canceling procedure if the currentlyused echo canceling procedure is not the same as the selected echocanceling procedure.
 23. An arrangement according to claim 21, whereinthe echo canceling unit comprises: a) an first input adapted to receivesignals from a microphone of the terminal, said signals from themicrophone referred to as microphone signals; b) a second input adaptedto receive speech signals from an opposite party; c) a first branchadapted to receive the microphone signals on the first input, andproduce a first estimate of an echo information in the microphonesignals, based on the received microphone signals and the receivedspeech signals from the opposite party; d) a second branch adapted toreceive the microphone signals on the first input; e) a subtracteradapted to perform a subtraction, where the first estimate produced inthe first branch will be subtracted from the signals of the secondbranch, before being outputted from the echo canceling unit.
 24. Anarrangement according to claim 23, comprising a delay circuit in thesecond branch is adapted to delay the received microphone signals by atime t before the first subtraction, the time t having the same lengthas the time it takes to produce the first estimate.
 25. An arrangementaccording to claim 23, wherein the echo canceling unit comprises: afirst down-sampler adapted to down-sample the received microphonesignals in the first branch with a down-sampling factor i; a seconddown-sampling means adapted to down-sample the received speech signalsfrom the opposite party with the down-sampling factor i; a digitalfilter adapted to produce a second estimate of the echo information inthe microphone signals, by filtering the down-sampled speech signalsfrom the opposite party; and an up-sampler adapted to produce the firstestimate by up-sampling the second estimate with an up-sampling factori, equal to the down-sampling factor i.
 26. An arrangement according toclaim 25 wherein the digital filter is adaptive based on the differencebetween the down-sampled microphone signals and the second estimate.